/**
 * @company : 版权所属 四川北星惯牌科技有限公司
 * @contact : 刘经理 19326416371
 **/
import App from './App';

//导入pinia 

// #ifndef VUE3
import Vue from 'vue'
import './uni.promisify.adaptor';
Vue.config.productionTip = false
App.mpType = 'app'
const app = new Vue({
	...App
})
app.$mount()
// #endif

// #ifdef VUE3
import uviewPlus from '@/uni_modules/uview-plus';
import persist from 'pinia-plugin-persistedstate';
import {
	createSSRApp
} from 'vue';
import {
	createPinia
} from 'pinia';
import {
	previewImg
} from '@/utils/utools.js';
import {
	$Api
} from '@/api/index.js';
import share from '@/hooks/share.js';
export function createApp() {
	const app = createSSRApp(App);
	app.mixin(share);
	app.config.globalProperties.$previewImg = previewImg;
	app.config.globalProperties.$Api = $Api;
	const pinia = createPinia();
	// 使用持久化插件
	pinia.use(persist);
	app.use(pinia);
	app.use(uviewPlus);
	return {
		app,
		pinia
	}
}
// #endif